home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 051-075 / disk_071 / iconmk / ic.doc < prev    next >
Text File  |  1992-05-06  |  12KB  |  255 lines

  1. This file describes the tool iconmaker version 1.2a. It has been developed
  2. using 1.2 kickstart and has not been tested under 1.1 although
  3. none of the new intuition or dos functions have been used.
  4.  
  5. This version is similar to 1.0 but includes an option called auto-icon that
  6. selects the icon type to use based on the file extension (.ext). Thus
  7. a directory of icons for .o, .c, .txt, .pic, .arc, etc. can be created
  8. and easily used to create icons. 
  9.  
  10. New in 1.2a is the ability to determine
  11. some file types and find the appropriate icon template to use. Also, a
  12. minor addition to the wildcard (toggle, un-select) and a double click to
  13. info-pick picks files WITH icons.
  14.  
  15. Iconmaker builds icons for files that were created without them. Many
  16. programs don't build icons when they create files using either a C
  17. runtime system or the dos file primitives. This is because icon creation
  18. requires extra program steps and it is difficult to create an in-memory
  19. icon structure with C program statements (the icons's picture is
  20. especially hard). However, if the program does have an icon file
  21. available, then it is a rather simple matter to clone it. Iconmaker takes
  22. this approach. 
  23.  
  24. Iconmaker may be invoked by the cli or workbench. If it is run from the
  25. cli, then it accepts zero or one argument: the name of a device and/or
  26. directory to start with.  If run from the workbench, then it also accepts
  27. one argument (use  extended selection: hold down the shift key and click
  28. Iconmaker (first) and then double click another object). The second
  29. object is used to determine the  directory to begin with. Iconmaker
  30. allows traversal up and down directory trees but cannot switch to another
  31. device; hence, start up Iconmaker on the disk with which you want to
  32. work. The default is to use the current directory if run from cli (with
  33. zero args) and the directory that Iconmaker is in if from workbench. 
  34.  
  35. When invoked, Iconmaker presents a requestor to the user as follows:
  36.  
  37. +-------------+---------------+               selected:directory/name
  38. |make project | -> Project    |       +--+ 
  39. |-------------+---------------|       |  |   file 1
  40. |make tool    | -> Tool       |       |  |   file 2
  41. |-------------+---------------|       |  |     .
  42. |make drawer  | -> (x,y)      |       |  |     .
  43. +-------------+---------------+       |  |     .
  44.                                       |  |     .
  45. +-------------+---------------+       |  |
  46. |Dir    Pick  | Info   pick   |       |  |
  47. |-------------+---------------|       |  |
  48. |File   Pick  | Auto . icon   |       |  |
  49. |-------------+---------------|       |  |
  50. |Read    Dir  | Read Parent   |       |  |
  51. |-------------+---------------|       |  |
  52. |Refresh Dir  | D-e-l-e-t-e   |       |  |
  53. +-------------+---------------+       +--+
  54.                                 
  55. +-----------------------------+       +------+ +------+ +------+ +------+
  56. |Pattern                      |       |quit  | | all  | | none | | quit |
  57. | *                           |       +------+ +------+ +------+ +------+
  58. +-----------------------------+ 
  59.                                 
  60. +-----------------------------+ 
  61. |Icon Template Pathnames      | 
  62. |icons:|project|tool|drawer|  | 
  63. +-----------------------------+ 
  64.  
  65. The gadget buttons direct the operations of iconmaker and the scrollable
  66. file name display is used for the selection of files that are to have
  67. icons created for them. There are also 2 text gadgets.
  68.  
  69. Iconmaker can  create 3 types of icon files: project, tool, and drawer.
  70. In order to do this, it needs to be able to find 3 template icon files. 
  71.  
  72. The text requestor, Icon Template Pathnames, is for entering the location
  73. of the icon files that will be used as the templates. This requestor is
  74. initialized with the following:
  75.  
  76.     icons:|project|tool|drawer|
  77.  
  78.  which has 4 text strings separated by vertical bars (|). The first
  79. (icons:) is a logical device name that can be defined to be equal to
  80. another device name and optionally one or more directories. For example,
  81. suppose there is a directory df0:icon_templates on the system disk. The
  82. following cli statement will define icons:
  83.  
  84.     assign icons: df0:icons_templates
  85.  
  86. Iconmaker would then look for 3 icon files,
  87.  
  88.         icons:project.info
  89.         icons:tool.info
  90.         icons:drawer.info
  91.  
  92. which when the assignment icons: is expanded, would result in the file
  93. names:
  94.  
  95.         df0:icons_templates/project.info
  96.         df0:icons_templates/tool.info
  97.         df0:icons_templates/drawer.info
  98.  
  99. The easiest way to use Iconmaker is to have a directory which contains
  100. template icons and use the startup-sequence file to make the assignment.
  101.  
  102. Note that if you want to use the workbench INFO option to edit the icons
  103. tool-types, stack size, and default tool fields then you will need files
  104. to go with the .info files. The files and drawer may be empty or not
  105. since they are not used by Iconmaker. 
  106.  
  107. You may also modify any of the strings in the text requestor. For
  108. example, if you did not assign icons at the cli level, then you could
  109. modify it in the text requestor directly as such:
  110.  
  111.     df0:icons_templates/|project|tool|drawer|
  112.  
  113. Note the trailing slash (/). Iconmaker builds each of the three file
  114. names by concatonating the first string with each of the following 3
  115. strings and appending .info to form the three names. 
  116.  
  117. Changing the names of the files is fine but there is one caveat. The
  118. order of the names corresponds to the 3 types of icons. While it is ok to
  119. use icons for tools and projects interchangably, you may not use either a
  120. project or a tool icon for a drawer icon. To do so will cause a crash
  121. when the drawer icon is clicked since drawer icon files have information
  122. about a window to build. This information is missing in other icon types
  123. and Iconmaker does not try to construct this information. Note that it is
  124. not necessary to enter a return in this text requestor to have its
  125. current contents be used.
  126.  
  127. When Iconmaker builds the new icon files, it always sets up the (x,y)
  128. location of the icon with a special code that causes the Workbench to
  129. place the icon in a window wherever it finds room. This is usually to be
  130. preferred (at least by me) since it always will do the equivalent of a
  131. clean-up operation after all the icons have been read for a drawer.
  132. However, it causes the WB to not display any icons until all have been
  133. read so it may present a blank window for some time. If you prefer to
  134. have icons show up as usual, then you will have to use the WB option
  135. snapshot.  There is also an option to convert existing icon files to
  136. auto-placement icons.
  137.  
  138. Once the locations of the template files have been determined, one may
  139. set  about to tell iconmaker which files need icons. There are 6ways to
  140. select files. The files in the scroll area will initially be un-selected.
  141. When they are selected, their color is complemented. Single files may be
  142. selected by pointing at their name with the mouse and clicking the left
  143. button. Any file that is already selected will become un-selected when
  144. clicked. (Iconmaker handles the file selection by using gadgets for each
  145. file name. This is slow, but by using blitzfonts or fastfonts it can
  146. be made considerably faster.) The selection methods are:
  147.  
  148. The buttons ALL and NONE will select just that. 
  149.  
  150. The buttons FILE PICK and DIR PICK are designed to select either files or
  151. directories that -- do not --  have icons already. Thus, a file or
  152. directory that has an associated .info file will not be selected.
  153. However, if either of these two buttons are clicked two times in a
  154. row, then they will select all files or directories. If selected
  155. repeatedly, the result will toggle back to the first select.
  156.  
  157. The button INFO PICK will select all *.info files except the file .info
  158. which is not a normal icon file. A second click of this button will
  159. select all the files for which icon files already exist (including
  160. directory files) and if selected again, will revert to a single click.
  161.  
  162. The three select buttons will first un-select all files.
  163.  
  164. The pattern requestor takes a * wildcard (as found on most other systems)
  165. for multiple character wildcarding and ? for single character wildcards.
  166. The pattern selects files in addition to any already selected files. The
  167. selection takes place when the return key is typed. Multiple selections
  168. may be made using the pattern gadget.
  169.  
  170. If the pattern begins with ! (bang) then the 2nd..last characters in the
  171. pattern are used and the action is to De-select all matches.
  172.  
  173. If the pattern begins with ~ (tilde) then the 2nd..last characters in the
  174. pattern are used and the action is to toggle the select for all matches.
  175.  
  176. Once a set of file has been selected, an operation may be performed. The
  177. operations are:
  178.  
  179. Make PROJECT, TOOL, and DRAWER. These three operations make icon files.
  180. Before using these operations, the corresponding files should be
  181. selected. Do not make icon files for icon files; Iconmaker will not check
  182. this.
  183.  
  184. Convert, denoted as   ->    , is used to change tool and project icons.
  185. Only the icon type is changed, other information remains the same. The
  186. option to convert (x,y) will set the icon files position to floating as
  187. described above.
  188.  
  189. The DELETE FILES options may be used on any files, including directories,
  190. but directories must be empty first. Deletion brings up a last chance
  191. cancel requestor.
  192.  
  193. AUTO . ICON will try to make icons for all selected files and directories.
  194. See below for more information.
  195.  
  196. The remaining operations are concerned with directory lookup operations.
  197.  
  198. The operation of REFRESH DIR will cause the current directory to be
  199. re-read  and displayed. Normally, when icons are created in the current
  200. directory, the display is not updated for reasons of clarity and speed.
  201. This option will make the directory current. The button READ PARENT will
  202. set the directory up the tree one level and read that directory. The
  203. button READ DIR will choose the first selected directory file and read
  204. that directory.
  205.  
  206. Some operations are invalid and will cause a requestor to appear. When
  207. one shows up with two OK buttons then the message is informational and
  208. the operation will be aborted once either OK button is picked. If the
  209. requestor shows an OK button and a CANCEL button then it means that one
  210. of the picked files is inappropriate to the action requested (for example
  211. make a project icon for a directory file). The OK button allows the
  212. operation to proceed (but does not operate on the offending file) while
  213. the CANCEL button will abort the operation on all remaining files that
  214. were selected.
  215.  
  216. There are two QUIT buttons that have identical meanings.
  217.  
  218. ===================
  219. Auto Icon creation.
  220. ===================
  221.  
  222. New with this version of Icon Maker, is the auto icon create option.
  223. This feature creates icons by using the part of the file name called the
  224. extension. This is the tail end of a file name beginning with a dot. The
  225. extension is used to select the icon file to use as the template. If
  226. there is no icon found using the extension, then the file is opened, the
  227. first 16 bytes read, and if it has the right header for an executable,
  228. then the icon exe.info is used (if it exists). If the file is an IFF
  229. file of type FORM, then the first header is used (in byte position 8..11
  230. in the file); pictures contain ILBM, sound files SMUS, etc. If the file
  231. type cannot be determined by reading it, then the icon misc.info is used
  232. as a last gasp.
  233.  
  234. The text box that contains the template names is used to find the
  235. directory where the templates exist.
  236.  
  237. For example,
  238.  
  239.         arcfile.arc  ->   use icons:arc.info
  240.         picfile.pic  ->   use icons:pic.info
  241.         picture      ->   use icons:ILBM.info  (if ilbm  iff)
  242.         executeme    ->   use icons:exe.info   (if runnable)
  243.         tune         ->   use icons:smus.info  (if smus  iff)
  244.  
  245. Note that the icon type is implicit in the .info file found. If the file
  246. is a directory, then a check is made that the icon is also and if not
  247. the drawer icon in the template directory is used instead. 
  248.  
  249. NOTE: If an iff file has a type of less than 4 characters, the SPACES
  250. at the end of the 1,2, or 3 characters IS significant and an icon
  251. would have to be named with the spaces (e.g. "xxx "). The iff cracker
  252. algorithm is VERY primitive, it may not work on all iff files - only
  253. those with FORM in the first 4 bytes and some other 4 bytes in the
  254. 3rd longword.
  255.